From: Giovanni Campagna Date: Wed, 22 Jan 2014 19:17:15 +0000 (+0100) Subject: BackgroundManager: don't destroy the newly created actor X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~1013^2^2~2886 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=816f5162f96d5af2f4af21c028cad09297ab9b2b;p=gnome-shell.git BackgroundManager: don't destroy the newly created actor Because we were setting this.background before calling .destroy(), the call that was meant to destroy the old background was actually destroying the new one! https://bugzilla.gnome.org/show_bug.cgi?id=722787 --- diff --git a/js/ui/background.js b/js/ui/background.js index f4d486cf4..3a7541cb5 100644 --- a/js/ui/background.js +++ b/js/ui/background.js @@ -748,14 +748,16 @@ const BackgroundManager = new Lang.Class({ time: FADE_ANIMATION_TIME, transition: 'easeOutQuad', onComplete: Lang.bind(this, function() { - if (this._newBackground == newBackground) { - this.background = newBackground; - this._newBackground = null; - } else { + if (this._newBackground != newBackground) { + /* Not interesting, we queued another load */ newBackground.actor.destroy(); + return; } this.background.actor.destroy(); + this.background = newBackground; + this._newBackground = null; + this.emit('changed'); }) });